package com.example.mybasedemo.app.presenter;

import com.example.mybasedemo.Framewrok.net.callback.RxSubscriber;
import com.example.mybasedemo.Framewrok.net.exception.ResponeThrowable;
import com.example.mybasedemo.app.model.logic.TopLineListModel;

import java.util.List;

/**
 * Created by dell on 2018/3/13.
 */

public class MianPresenterImp extends MianContract.Presenter {
    @Override
    public void getPresenterVideoCatelist(String currentPage, String newsClassId) {
        addSubscribe(mModel.getModelVideoAllCate(mContext,currentPage,newsClassId).subscribe(new RxSubscriber<List<TopLineListModel>>() {
            @Override
            public void onSuccess(List<TopLineListModel> mVideoCateList) {
                mView.getViewVideoAllCate(mVideoCateList);
            }
            @Override
            protected void onError(ResponeThrowable ex) {
                mView.showErrorWithStatus(ex.message);
            }
        }));
    }
}
